<?php
/**
 * Truncate HTML
 *
 * @package     Visi
 * @subpackage  View Helpers
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2011 Coalition Technologies <joel@coalitiontechnologies.com>
 * @version     $Id$
 * @todo        This was placed here temporarily because the actual truncateHtml
 *              helper I wrote is on a different computer.
 * @todo        Create a truncateHtmlWords() helper that counts words rather
 *              than characters
 */
class Visi_View_Helper_TruncateHtml extends Zend_View_Helper_Abstract {

    public function truncateHtml($text, $num, $after = '') {
    
        $ret = substr($text, 0, $num);
        if (strlen($text) > $num) $ret .= $after;
        return $ret;
    
    }

}
